package com.dingding.dao.usermangerdao;

import java.util.List;

import com.dingding.bean.databean.push.PushCompetitiveOrder;
import com.dingding.bean.databean.push.PushCurrentCity;
import com.dingding.bean.databean.request.ReqGetPushUerInfo;
import com.dingding.bean.databean.request.ReqResetAddress;
import com.dingding.bean.databean.request.ReqScanInfo;
import com.dingding.bean.databean.request.ReqUpdateUserInfo;
import com.dingding.bean.databean.request.ReqUserLoginByNum;
import com.dingding.bean.databean.request.ReqUserRegister;
import com.dingding.bean.databean.response.ResScanInfo;
import com.dingding.bean.databean.response.ResUserLoginByNum;
import com.dingding.bean.entity.Userdetail;
import com.dingding.common.core.beans.Userordert;
import com.dingding.dao.basedao.IBaseDao;

public interface IUserDetailDao extends IBaseDao<Userdetail> {

	/**
	 * @return 
	 * @Title: objectToResScanInfo
	 * @Description: 将Object[]转换为ResScanInfo实体bean
	 * @param reqScanInfo 查看对方信息请求bean
	 * @param resScanInfo 查看对方信息响应bean
	 * @author Li Yi
	 * @return
	 * @throws
	 */
	public void getResScanInfo(ReqScanInfo reqScanInfo, ResScanInfo resScanInfo);

	/**
	 *
	 * @Title: getUserInfo 
	 * @Description:用户抢单获取用户信息
	 * @param userType 下单用户类型
	 * @param userId 下单用户ID
	 * @param grabOrderUserId 抢单用户Id
	 * @author cheshaowei
	 * @throws
	 */
	public PushCompetitiveOrder getUserInfo(int userType, String userId, String grabOrderUserId);

	/**
	 * @Title: saveUserDetail
	 * @Description: 保存到用户详情表
	 * @param @param reqUserRegister 客户端注册请求bean
	 * @param @param userLoginId   登录Id
	 * @param @param userDetailId  用户详情主键ID
	 * @author Li Yi
	 * @return
	 */
	public void saveUserDetail(ReqUserRegister reqUserRegister, String userLoginId, String userDetailId);

	/**
	 *
	 * @Title: uploadUserAvatar 
	 * @Description:设置用户头像
	 * @param userId 用户ID
	 * @param  url 图片访问路径
	 * @author cheshaowei
	 * @throws
	 */
	public void uploadUserAvatar(String userId, String url);

	/**
	 * @Title: updateCurrentCity 
	 * @Description: 更新用户的当前城市
	 * @author lijinchao
	 * @return void
	 * @throws
	 */
	public void updateCurrentCity(String currentCity, Userdetail userdetail);

	/**
	 * @Title: getPushUserList
	 * @Description: 根据订单信息获取推送用户信息
	 * @param userordert 订单信息
	 * @param startDistance 开始位置的范围
	 * @param destinationDistance 目的地位置的范围
	 * @author yuHaiQing
	 * @return List<PushCurrentCity>    返回类型
	 * @throws
	 */
	public List<PushCurrentCity> getPushUserList(Userordert userordert, double startDistance,
			double destinationDistance);

	/**
	 * @Title: getPushUserInfo 
	 * @Description: 获取对方用户信息
	 * @param reqGetPushUerInfo
	 * @author lijinchao
	 * @return Object
	 * @throws
	 */
	public Object getPushUserInfo(ReqGetPushUerInfo reqGetPushUerInfo, Userordert userordert);

	/**
	 * @Title: updateUserInfo 
	 * @Description: 更新用户资料
	 * @param reqUpdateUserInfo	更新用户资料请求bean
	 * @param userdetail 用户详情对象
	 * @author lijinchao
	 * @return void
	 * @throws
	 */
	public void updateUserInfo(ReqUpdateUserInfo reqUpdateUserInfo, Userdetail userdetail);

	/**
	 * @Title: getUserdetail
	 * @Description: 设置地址
	 * @param reqResetAddress 设置地址-客户端请求bean
	 * @param userdetail 用户详情对象
	 * @author lijinchao
	 * @throws
	 */
	public void setUserdetailAddress(ReqResetAddress reqResetAddress, Userdetail userdetail);

	/**
	 * @Title: saveUserDetailByNum
	 * @Description: 保存到用户详情表
	 * @param reqUserLoginByNum
	 *            -用户注册请求ben
	 * @param userLoginId
	 *            -登录id
	 * @param userDetailId
	 *            -详情表主键id
	 * @author Li Yi
	 * @return
	 */
	public void saveUserDetailByNum(ReqUserLoginByNum reqUserLoginByNum, String userLoginId, String userDetailId,
			ResUserLoginByNum resUserLoginByNum);

	/**
	 * @Title: updateCurrentCity
	 * @Description: 更新用户当前城市
	 * @param userId 用户id
	 * @param currentCity 当前城市
	 * @author fengshuonan
	 * @return void
	 * @throws
	 */
	public void updateCurrentCity(String userId, String currentCity);

	/**
	 * @Title: getUserDetailInfo 
	 * @Description: 根据用户Id获取用户详情信息
	 * @param userId   用户Id
	 * @author YHQ 
	 * @return void    返回类型
	 */
	public Userdetail getUserDetailInfo(String userId);

	/**
	 * 
	 * 乘客评价完成后，重新计算车主信誉等级并更新
	 * 
	 * @Title: updateUserReputateLevel 
	 * @param driverId 车主ID 
	 * @return  boolean true 成功 false 失败
	 * @author CHEHAUNBO
	 * 
	 */
	public boolean updateUserReputateLevel(String driverId);

}
